-----------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Ellen\Dropbox\Pajaro_AgInnovation\Submission\JAERE\Replication_Code\Log\D
> inD_quarterly_log.log
  log type:  text
 opened on:  29 Nov 2023, 16:56:03

. *log using "Submission\JAERE\Replication_Code\Log\DinD_quarterly_unbalanced_log.log", r
> eplace
. *log using "Submission\JAERE\Replication_Code\Log\DinD_annual_log.log", replace
. 
. *SELECT DATASET
. global dataset 1         

. global quarterly "Data\Parcel_Clean_20230626.dta"

. global yearrun "Data\Parcel_Clean_yearrun_20230626.dta"

. 
. if $dataset == 1 use $quarterly, clear

. if $dataset == 2 use $yearrun, clear

. 
. *GENERATE LAG DELIVERIES -- TOGGLE ON/OFF BASED ON CALLED DATASET
. sort parcelnum quarter 

. by parcelnum: gen lagdelivered = delivered[_n-1]
(754 missing values generated)

. 
. *sort parcelnum year_run 
. *by parcelnum: gen lagdelivered = delivered[_n-1]
. 
end of do-file

. do "C:\Users\Ellen\AppData\Local\Temp\STD978_000000.tmp"

. *USE QUARTERLY DATA HERE
. *COLUMNS (3) and (4)    
. eststo clear

. preserve

. drop if year<2005
(0 observations deleted)

. drop if year==2005 | year ==2010
(5,427 observations deleted)

. *keep if quarter==3
. keep if post==0
(27,203 observations deleted)

. *Step 1: no controls
. eststo: reg extraction c.time i.inside#c.time inside i.quarter#i.year 
note: 4.quarter#2009.year omitted because of collinearity

      Source |       SS           df       MS      Number of obs   =    10,971
-------------+----------------------------------   F(17, 10953)    =     82.10
       Model |   1291893.1        17  75993.7116   Prob > F        =    0.0000
    Residual |  10138559.7    10,953   925.64226   R-squared       =    0.1130
-------------+----------------------------------   Adj R-squared   =    0.1116
       Total |  11430452.8    10,970  1041.97382   Root MSE        =    30.424

-------------------------------------------------------------------------------
   extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
--------------+----------------------------------------------------------------
         time |   .5086258    .112989     4.50   0.000     .2871469    .7301047
              |
inside#c.time |
           1  |   .2080275    .185847     1.12   0.263    -.1562661    .5723212
              |
       inside |    5.81299   3.882139     1.50   0.134    -1.796702    13.42268
              |
 quarter#year |
      1 2007  |  -1.808161   1.479611    -1.22   0.222    -4.708466    1.092143
      1 2008  |  -3.925236   1.428915    -2.75   0.006    -6.726168   -1.124305
      1 2009  |  -6.657567   1.510722    -4.41   0.000    -9.618855   -3.696279
      2 2006  |   8.276102   1.596325     5.18   0.000     5.147016    11.40519
      2 2007  |   11.85763   1.445376     8.20   0.000     9.024435    14.69083
      2 2008  |   13.48125   1.435417     9.39   0.000     10.66757    16.29492
      2 2009  |   5.480507   1.541857     3.55   0.000     2.458189    8.502825
      3 2006  |   25.79019   1.549278    16.65   0.000     22.75332    28.82705
      3 2007  |    26.7604   1.432515    18.68   0.000     23.95242    29.56839
      3 2008  |   22.20139   1.453709    15.27   0.000     19.35186    25.05093
      3 2009  |   19.86058   1.605015    12.37   0.000     16.71446     23.0067
      4 2006  |   6.801985   1.510163     4.50   0.000     3.841793    9.762177
      4 2007  |   3.043839   1.427471     2.13   0.033     .2457378    5.841939
      4 2008  |   3.712108   1.476051     2.51   0.012     .8187816    6.605435
      4 2009  |          0  (omitted)
              |
        _cons |  -3.910199   2.465063    -1.59   0.113    -8.742168    .9217692
-------------------------------------------------------------------------------
(est1 stored)

. estadd local time "\checkmark"

added macro:
               e(time) : "\checkmark"

. estadd local yc " "             

added macro:
                 e(yc) : " "

. *Step 2: condition on these observables, and find no pre-trend. 
. eststo: reg extraction c.time i.inside#c.time inside i.quarter#i.year i.year#i.county
note: 4.quarter#2009.year omitted because of collinearity
note: 2007.year#2.county_code omitted because of collinearity
note: 2008.year#2.county_code omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity

      Source |       SS           df       MS      Number of obs   =    10,971
-------------+----------------------------------   F(21, 10949)    =     71.79
       Model |  1383346.78        21  65873.6562   Prob > F        =    0.0000
    Residual |    10047106    10,949  917.627727   R-squared       =    0.1210
-------------+----------------------------------   Adj R-squared   =    0.1193
       Total |  11430452.8    10,970  1041.97382   Root MSE        =    30.292

----------------------------------------------------------------------------------
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
            time |   .1751668   .1281776     1.37   0.172    -.0760844     .426418
                 |
   inside#c.time |
              1  |   .1776262   .1871813     0.95   0.343    -.1892831    .5445355
                 |
          inside |   5.190487   3.908462     1.33   0.184    -2.470804    12.85178
                 |
    quarter#year |
         1 2007  |   -5.71099   1.647574    -3.47   0.001    -8.940533   -2.481447
         1 2008  |  -7.126609    1.54508    -4.61   0.000    -10.15524   -4.097974
         1 2009  |  -7.639588   1.514914    -5.04   0.000    -10.60909   -4.670083
         2 2006  |    8.61487   1.590564     5.42   0.000     5.497077    11.73266
         2 2007  |   8.299688   1.600079     5.19   0.000     5.163244    11.43613
         2 2008  |   10.62846   1.542653     6.89   0.000     7.604585    13.65234
         2 2009  |   4.811086   1.540028     3.12   0.002     1.792353     7.82982
         3 2006  |   26.46331   1.547249    17.10   0.000     23.43042     29.4962
         3 2007  |   23.55464   1.573053    14.97   0.000     20.47118    26.63811
         3 2008  |   19.67887   1.554339    12.66   0.000     16.63209    22.72566
         3 2009  |   19.52068   1.599217    12.21   0.000     16.38593    22.65544
         4 2006  |   7.816091   1.514553     5.16   0.000     4.847293    10.78489
         4 2007  |   .2035276    1.55441     0.13   0.896    -2.843396    3.250451
         4 2008  |   1.520537   1.572244     0.97   0.334    -1.561346    4.602419
         4 2009  |          0  (omitted)
                 |
year#county_code |
         2006 2  |  -4.888814   1.227966    -3.98   0.000    -7.295849    -2.48178
         2007 1  |   5.923232   1.220025     4.86   0.000     3.531763    8.314702
         2007 2  |          0  (omitted)
         2008 1  |   7.976151   1.226737     6.50   0.000     5.571525    10.38078
         2008 2  |          0  (omitted)
         2009 1  |   5.399843   1.234127     4.38   0.000     2.980732    7.818954
         2009 2  |          0  (omitted)
                 |
           _cons |   3.771555    2.92529     1.29   0.197    -1.962542    9.505652
----------------------------------------------------------------------------------
(est2 stored)

. estadd local time  "\checkmark "

added macro:
               e(time) : "\checkmark "

. estadd local yc "\checkmark"    

added macro:
                 e(yc) : "\checkmark"

. restore

. 
. esttab using "Tables\Ptrends_table_quarter_$outputdate.tex", label replace ///
>         se star(* .10 ** .05 *** .01) scalars( "time Time FE" "yc Year-County FE") ///
>         cells(b(star fmt(2)) se(par fmt(2)))
(output written to Tables\Ptrends_table_quarter_20231129.tex)

. eststo clear

. 
. 
. 
. ********************************************************************************
. *Table 2 and 8: QUARTERLY EXTRACTION DIFF IN DIFF: ROBUSTNESS TEST
. ********************************************************************************
. *Table 8 is unbalanced. Table 2 second half is balanced. 
. 
. *ALTER FOR BALANCED OR UNBALANCED ROBUSTNESS TABLE (AND CHANGE HOW TABLE IS SAVED):
. *Balance the panel
. bysort parcelnum: gen ntime = [_N]

. sum ntime

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       ntime |     43,601    61.32862    8.353222          1         64

. keep if ntime==`r(max)'
(9,233 observations deleted)

. 
. *DROP 2010
. drop if year==2010
(2,148 observations deleted)

. 
. *Make sample set consistent across robustness tests
. drop if delivered ==. 
(0 observations deleted)

. drop if CL_zonedate ==. 
(4,771 observations deleted)

. drop if gw_depth ==. 
(5,547 observations deleted)

. 
. *Calculate pre-period mean for inside zone to report in table 
. bys inside: sum extraction if post==0

-----------------------------------------------------------------------------------------
-> inside = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |      1,874    20.00633    31.41061          0    432.752

-----------------------------------------------------------------------------------------
-> inside = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |        310    29.72475    41.61925          0     302.65


. preserve

. drop if lagdelivered==.
(290 observations deleted)

. bys inside: sum extraction if post==0 

-----------------------------------------------------------------------------------------
-> inside = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |      1,874    20.00633    31.41061          0    432.752

-----------------------------------------------------------------------------------------
-> inside = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |        305     30.0452    41.82085          0     302.65


. restore

. 
. *Quarterly Robustness table: 
. eststo clear

. *Column 1: Baseline
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county if year<2016, fe cl
> uster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,640
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2245                                         min =          4
     between = 0.0073                                         avg =       23.6
     overall = 0.0801                                         max =         25

                                                F(31,534)         =      13.09
corr(u_i, Xb)  = -0.0533                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -9.019242   3.120584    -2.89   0.004    -15.14937   -2.889116
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |   -22.2301   4.048837    -5.49   0.000     -30.1837    -14.2765
         1 2011  |  -9.376573   .7561672   -12.40   0.000      -10.862   -7.891146
         1 2012  |  -5.227235   .7417151    -7.05   0.000    -6.684273   -3.770198
         1 2013  |  -9.003782   .7850147   -11.47   0.000    -10.54588   -7.461686
         1 2014  |  -3.965164   .6792144    -5.84   0.000    -5.299424   -2.630904
         1 2015  |  -7.807223    .621435   -12.56   0.000     -9.02798   -6.586466
         2 2008  |   12.26124    1.81237     6.77   0.000     8.700995    15.82149
         2 2009  |          0  (empty)
         2 2011  |   1.868291    .682315     2.74   0.006     .5279404    3.208642
         2 2012  |   5.059702   .9082278     5.57   0.000     3.275564    6.843839
         2 2013  |   9.042561   1.099791     8.22   0.000     6.882114    11.20301
         2 2014  |   5.132404   .7213903     7.11   0.000     3.715293    6.549515
         2 2015  |   4.412937   .6280299     7.03   0.000     3.179225    5.646649
         3 2008  |          0  (empty)
         3 2009  |   19.34117   1.433283    13.49   0.000      16.5256    22.15673
         3 2011  |    14.7632   1.250253    11.81   0.000     12.30718    17.21922
         3 2012  |   15.86132   1.350345    11.75   0.000     13.20868    18.51396
         3 2013  |   17.12566   1.407276    12.17   0.000     14.36118    19.89013
         3 2014  |   16.36258   1.185582    13.80   0.000     14.03361    18.69156
         3 2015  |   16.89267   1.144086    14.77   0.000     14.64521    19.14014
         4 2008  |   2.262701    1.44442     1.57   0.118    -.5747408    5.100143
         4 2009  |  -2.469274   .8021328    -3.08   0.002    -4.044997   -.8935511
         4 2011  |  -2.051533   .7095754    -2.89   0.004    -3.445434    -.657631
         4 2012  |    -2.7209    .726903    -3.74   0.000     -4.14884    -1.29296
         4 2013  |   1.695942   .6260814     2.71   0.007     .4660573    2.925826
         4 2014  |  -3.047883   .7052821    -4.32   0.000    -4.433351   -1.662415
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.677652   1.677765    -1.60   0.111    -5.973481    .6181767
         2009 1  |   3.007154   1.698261     1.77   0.077    -.3289381    6.343246
         2009 2  |          0  (omitted)
         2011 1  |  -1.662352   1.063874    -1.56   0.119    -3.752243    .4275397
         2011 2  |          0  (omitted)
         2012 1  |   .2640818   1.489323     0.18   0.859    -2.661568    3.189732
         2012 2  |          0  (omitted)
         2013 1  |   1.562952   1.133232     1.38   0.168    -.6631874    3.789092
         2013 2  |          0  (omitted)
         2014 1  |     1.2607   1.175444     1.07   0.284    -1.048361    3.569762
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
           _cons |   14.58863   .6007594    24.28   0.000     13.40849    15.76877
-----------------+----------------------------------------------------------------
         sigma_u |  22.571444
         sigma_e |   17.52932
             rho |  .62377946   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est1 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 2: Main specification w/ deliveries
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered if year<2
> 016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,640
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2258                                         min =          4
     between = 0.0052                                         avg =       23.6
     overall = 0.0896                                         max =         25

                                                F(32,534)         =      12.65
corr(u_i, Xb)  = -0.0233                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -10.47832   3.501507    -2.99   0.003    -17.35674   -3.599904
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -19.52317    2.92325    -6.68   0.000    -25.26565   -13.78069
         1 2011  |   -9.02701   .7695051   -11.73   0.000    -10.53864   -7.515382
         1 2012  |  -5.024101   .7462628    -6.73   0.000    -6.490072    -3.55813
         1 2013  |  -8.641766   .7890905   -10.95   0.000    -10.19187   -7.091663
         1 2014  |  -3.893026   .6820416    -5.71   0.000     -5.23284   -2.553212
         1 2015  |  -7.471535   .6474659   -11.54   0.000    -8.743428   -6.199643
         2 2008  |   12.47064   1.815922     6.87   0.000     8.903415    16.03787
         2 2009  |          0  (empty)
         2 2011  |   1.950118   .6824675     2.86   0.004     .6094674    3.290768
         2 2012  |   4.877821   .9323942     5.23   0.000     3.046211    6.709432
         2 2013  |   8.853707   1.127736     7.85   0.000     6.638363    11.06905
         2 2014  |   5.024828   .7280244     6.90   0.000     3.594685    6.454971
         2 2015  |   4.231105   .6692482     6.32   0.000     2.916423    5.545787
         3 2008  |          0  (empty)
         3 2009  |   19.01963   1.471413    12.93   0.000     16.12917     21.9101
         3 2011  |    14.4762   1.279739    11.31   0.000     11.96226    16.99014
         3 2012  |   15.61268   1.373728    11.37   0.000     12.91411    18.31126
         3 2013  |   16.74086   1.443185    11.60   0.000     13.90585    19.57588
         3 2014  |   15.89988   1.208051    13.16   0.000     13.52676    18.27299
         3 2015  |   16.31492   1.230713    13.26   0.000     13.89729    18.73256
         4 2008  |   2.538435   1.470253     1.73   0.085    -.3497532    5.426624
         4 2009  |  -2.391651   .7873339    -3.04   0.003    -3.938302    -.844999
         4 2011  |  -1.938586   .7055488    -2.75   0.006    -3.324578   -.5525942
         4 2012  |  -2.635968   .7246855    -3.64   0.000    -4.059552   -1.212384
         4 2013  |   1.611931   .6292856     2.56   0.011     .3757521     2.84811
         4 2014  |  -2.998339   .7075011    -4.24   0.000    -4.388165   -1.608512
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.905787   1.699105    -1.71   0.088    -6.243536     .431963
         2009 1  |   2.983378   1.696114     1.76   0.079    -.3484966    6.315252
         2009 2  |          0  (omitted)
         2011 1  |  -1.353121   1.108694    -1.22   0.223    -3.531058    .8248163
         2011 2  |          0  (omitted)
         2012 1  |   .3967241   1.499681     0.26   0.791    -2.549274    3.342722
         2012 2  |          0  (omitted)
         2013 1  |   1.623397   1.139887     1.42   0.155    -.6158161     3.86261
         2013 2  |          0  (omitted)
         2014 1  |   1.250216   1.175157     1.06   0.288    -1.058282    3.558714
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0045945   .0032071     1.43   0.153    -.0017055    .0108945
           _cons |   14.22324   .5986345    23.76   0.000     13.04727    15.39921
-----------------+----------------------------------------------------------------
         sigma_u |  22.374513
         sigma_e |  17.515298
             rho |  .62003473   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est2 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 3: plus lagged deliveries
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered lagdelive
> red if year<2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,474
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2240                                         min =          4
     between = 0.0039                                         avg =       23.3
     overall = 0.0899                                         max =         25

                                                F(33,534)         =      12.20
corr(u_i, Xb)  = -0.0172                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -9.733205   3.399378    -2.86   0.004      -16.411   -3.055411
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -19.81993   3.129078    -6.33   0.000    -25.96675   -13.67312
         1 2011  |  -9.006592   .7897717   -11.40   0.000    -10.55803   -7.455151
         1 2012  |  -4.743873   .7811604    -6.07   0.000    -6.278397   -3.209349
         1 2013  |  -8.632068   .8238755   -10.48   0.000     -10.2505   -7.013634
         1 2014  |  -3.758875   .7089763    -5.30   0.000      -5.1516   -2.366151
         1 2015  |  -7.450486   .6758855   -11.02   0.000    -8.778206   -6.122766
         2 2008  |   12.43545   1.820226     6.83   0.000     8.859763    16.01113
         2 2009  |          0  (empty)
         2 2011  |   1.966296   .6813295     2.89   0.004     .6278809     3.30471
         2 2012  |   4.874471   .9332278     5.22   0.000     3.041223    6.707719
         2 2013  |   8.839999   1.123416     7.87   0.000     6.633143    11.04686
         2 2014  |    5.08493   .7291129     6.97   0.000     3.652648    6.517211
         2 2015  |   4.276996   .6629846     6.45   0.000     2.974618    5.579374
         3 2008  |          0  (empty)
         3 2009  |   19.09397   1.473281    12.96   0.000     16.19983     21.9881
         3 2011  |   14.47139   1.284884    11.26   0.000     11.94735    16.99544
         3 2012  |   15.48693   1.376904    11.25   0.000     12.78212    18.19174
         3 2013  |   16.66398   1.441829    11.56   0.000     13.83163    19.49634
         3 2014  |   15.95204   1.210605    13.18   0.000     13.57391    18.33018
         3 2015  |   16.39101   1.227613    13.35   0.000     13.97946    18.80255
         4 2008  |   2.483242   1.471442     1.69   0.092    -.4072826    5.373767
         4 2009  |  -2.337831   .7874228    -2.97   0.003    -3.884657   -.7910046
         4 2011  |  -1.973386     .70745    -2.79   0.005    -3.363113   -.5836599
         4 2012  |  -2.746553   .7334371    -3.74   0.000    -4.187329   -1.305777
         4 2013  |   1.563088    .633426     2.47   0.014     .3187753      2.8074
         4 2014  |  -2.986476   .7086852    -4.21   0.000    -4.378629   -1.594323
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.836532   1.703692    -1.66   0.097    -6.183293    .5102284
         2009 1  |   2.854384   1.703181     1.68   0.094    -.4913725    6.200141
         2009 2  |          0  (omitted)
         2011 1  |  -1.497275   1.128112    -1.33   0.185    -3.713357    .7188078
         2011 2  |          0  (omitted)
         2012 1  |   .6029309    1.53002     0.39   0.694    -2.402665    3.608527
         2012 2  |          0  (omitted)
         2013 1  |    1.80553    1.16135     1.55   0.121    -.4758446    4.086905
         2013 2  |          0  (omitted)
         2014 1  |     1.1626   1.186442     0.98   0.328    -1.168067    3.493267
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0033352   .0029633     1.13   0.261     -.002486    .0091565
    lagdelivered |   .0015277    .001242     1.23   0.219    -.0009121    .0039676
           _cons |   14.11857   .6061962    23.29   0.000     12.92775     15.3094
-----------------+----------------------------------------------------------------
         sigma_u |  22.553879
         sigma_e |  17.518573
             rho |  .62370189   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est3 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 4:      Add control for chlorides
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county CL_zonedate if year
> <2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,640
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2249                                         min =          4
     between = 0.0080                                         avg =       23.6
     overall = 0.0692                                         max =         25

                                                F(32,534)         =      12.69
corr(u_i, Xb)  = -0.0963                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -9.967677   3.305728    -3.02   0.003     -16.4615   -3.473851
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -27.53016   6.556809    -4.20   0.000    -40.41046   -14.64985
         1 2011  |   -8.48665   .9120491    -9.31   0.000    -10.27829   -6.695005
         1 2012  |  -4.799243   .7933325    -6.05   0.000    -6.357678   -3.240808
         1 2013  |   -9.18555   .7952619   -11.55   0.000    -10.74778   -7.623325
         1 2014  |  -1.861008   1.416776    -1.31   0.190    -4.644145    .9221294
         1 2015  |  -7.123201   .7346247    -9.70   0.000     -8.56631   -5.680092
         2 2008  |   11.43738    1.89311     6.04   0.000     7.718521    15.15623
         2 2009  |          0  (empty)
         2 2011  |   1.369573   .7358977     1.86   0.063    -.0760364    2.815182
         2 2012  |   4.517422     .95559     4.73   0.000     2.640245    6.394598
         2 2013  |   8.196252   1.249643     6.56   0.000     5.741433    10.65107
         2 2014  |   4.211854   .8952894     4.70   0.000     2.453133    5.970575
         2 2015  |   3.554986   .8254402     4.31   0.000     1.933478    5.176494
         3 2008  |          0  (empty)
         3 2009  |    18.2885   1.570869    11.64   0.000     15.20266    21.37434
         3 2011  |    14.7439   1.250117    11.79   0.000     12.28814    17.19965
         3 2012  |   16.04852   1.354937    11.84   0.000     13.38686    18.71018
         3 2013  |   17.07011   1.407256    12.13   0.000     14.30567    19.83454
         3 2014  |   15.83147   1.201925    13.17   0.000     13.47039    18.19255
         3 2015  |    16.3378   1.205201    13.56   0.000     13.97029    18.70532
         4 2008  |   1.483518   1.508892     0.98   0.326    -1.480573     4.44761
         4 2009  |  -2.971729   .8920668    -3.33   0.001     -4.72412   -1.219339
         4 2011  |  -2.443863   .7434824    -3.29   0.001    -3.904372   -.9833545
         4 2012  |  -3.166591   .7617377    -4.16   0.000    -4.662961   -1.670221
         4 2013  |    .977768   .7284964     1.34   0.180    -.4533022    2.408838
         4 2014  |  -3.254136    .704725    -4.62   0.000     -4.63851   -1.869763
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.667146   1.677599    -1.59   0.112    -5.962649     .628356
         2009 1  |   2.966421   1.697122     1.75   0.081    -.3674331    6.300276
         2009 2  |          0  (omitted)
         2011 1  |  -1.620649   1.065629    -1.52   0.129    -3.713988     .472691
         2011 2  |          0  (omitted)
         2012 1  |   .1844024   1.487987     0.12   0.901    -2.738624    3.107428
         2012 2  |          0  (omitted)
         2013 1  |   1.481009   1.129253     1.31   0.190    -.7373134    3.699332
         2013 2  |          0  (omitted)
         2014 1  |   1.249632   1.174993     1.06   0.288    -1.058544    3.557809
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
     CL_zonedate |  -.0366084   .0208821    -1.75   0.080    -.0776295    .0044127
           _cons |   17.47162   1.834365     9.52   0.000     13.86816    21.07507
-----------------+----------------------------------------------------------------
         sigma_u |  22.852632
         sigma_e |  17.524773
             rho |  .62969339   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est4 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 5: Add control for gw depth
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county gw_depth if year<20
> 16, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,640
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2245                                         min =          4
     between = 0.0476                                         avg =       23.6
     overall = 0.0534                                         max =         25

                                                F(32,534)         =      12.67
corr(u_i, Xb)  = -0.1321                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -8.945281   3.109446    -2.88   0.004    -15.05353   -2.837035
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -22.03672   4.060309    -5.43   0.000    -30.01286   -14.06059
         1 2011  |  -9.149138   .8207492   -11.15   0.000    -10.76143   -7.536844
         1 2012  |  -5.070522   .7748864    -6.54   0.000    -6.592722   -3.548323
         1 2013  |  -8.919411   .8020153   -11.12   0.000     -10.4949   -7.343919
         1 2014  |  -3.956026   .6781765    -5.83   0.000    -5.288247   -2.623805
         1 2015  |  -7.807267   .6214988   -12.56   0.000     -9.02815   -6.586385
         2 2008  |    12.3121   1.829598     6.73   0.000     8.718009     15.9062
         2 2009  |          0  (empty)
         2 2011  |   2.094084   .7598819     2.76   0.006     .6013597    3.586808
         2 2012  |   5.216787   .9435639     5.53   0.000     3.363235    7.070339
         2 2013  |   9.126974   1.112481     8.20   0.000     6.941597    11.31235
         2 2014  |   5.141425   .7220505     7.12   0.000     3.723017    6.559833
         2 2015  |   4.413128   .6280811     7.03   0.000     3.179316    5.646941
         3 2008  |          0  (empty)
         3 2009  |   19.50137   1.466888    13.29   0.000     16.61979    22.38295
         3 2011  |     14.989   1.297855    11.55   0.000     12.43947    17.53853
         3 2012  |   16.01981   1.368474    11.71   0.000     13.33156    18.70807
         3 2013  |   17.21186   1.416656    12.15   0.000     14.42896    19.99477
         3 2014  |    16.3716   1.185892    13.81   0.000     14.04202    18.70119
         3 2015  |   16.89283   1.144147    14.76   0.000     14.64524    19.14041
         4 2008  |   2.313285   1.460253     1.58   0.114    -.5552598     5.18183
         4 2009  |  -2.308474   .8247347    -2.80   0.005    -3.928596   -.6883517
         4 2011  |  -1.825731   .7790307    -2.34   0.019    -3.356072   -.2953907
         4 2012  |  -2.563853   .7767889    -3.30   0.001     -4.08979   -1.037916
         4 2013  |   1.780658   .6404342     2.78   0.006     .5225787    3.038738
         4 2014  |  -3.038862    .705604    -4.31   0.000    -4.424962   -1.652762
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.701334    1.68354    -1.60   0.109    -6.008508    .6058397
         2009 1  |   2.910558   1.707723     1.70   0.089     -.444121    6.265236
         2009 2  |          0  (omitted)
         2011 1  |  -1.710814   1.069498    -1.60   0.110    -3.811753    .3901245
         2011 2  |          0  (omitted)
         2012 1  |   .1821458   1.500747     0.12   0.903    -2.765946    3.130238
         2012 2  |          0  (omitted)
         2013 1  |   1.511669   1.135971     1.33   0.184    -.7198507    3.743189
         2013 2  |          0  (omitted)
         2014 1  |   1.253948   1.174302     1.07   0.286     -1.05287    3.560767
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
        gw_depth |    .028728   .0321964     0.89   0.373    -.0345191    .0919752
           _cons |   11.02384   4.068268     2.71   0.007     3.032068    19.01561
-----------------+----------------------------------------------------------------
         sigma_u |  23.330653
         sigma_e |  17.529625
             rho |  .63916725   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est5 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 6: Add controls for all
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered CL_zoneda
> te gw_depth if year<2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     12,640
Group variable: parcelnum                       Number of groups  =        535

R-sq:                                           Obs per group:
     within  = 0.2259                                         min =          4
     between = 0.0563                                         avg =       23.6
     overall = 0.0508                                         max =         25

                                                F(34,534)         =      11.90
corr(u_i, Xb)  = -0.1404                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 535 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -10.63922    3.53028    -3.01   0.003    -17.57416   -3.704282
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -21.61564   3.808692    -5.68   0.000     -29.0975   -14.13378
         1 2011  |  -8.421053   .9296824    -9.06   0.000    -10.24734    -6.59477
         1 2012  |  -4.676869   .8205507    -5.70   0.000    -6.288772   -3.064966
         1 2013  |  -8.639801   .7905056   -10.93   0.000    -10.19268   -7.086919
         1 2014  |  -3.052792   1.016992    -3.00   0.003    -5.050587   -1.054996
         1 2015  |  -7.228591   .7086167   -10.20   0.000    -8.620609   -5.836573
         2 2008  |   12.18912   1.853855     6.58   0.000     8.547374    15.83086
         2 2009  |          0  (empty)
         2 2011  |    2.02566   .7429253     2.73   0.007     .5662457    3.485075
         2 2012  |   4.873101    .940832     5.18   0.000     3.024916    6.721287
         2 2013  |   8.638687   1.163777     7.42   0.000     6.352543    10.92483
         2 2014  |    4.67984   .7734633     6.05   0.000     3.160436    6.199244
         2 2015  |   3.906285   .6741697     5.79   0.000     2.581935    5.230635
         3 2008  |          0  (empty)
         3 2009  |   18.82808   1.504523    12.51   0.000     15.87257    21.78359
         3 2011  |   14.77325   1.323843    11.16   0.000     12.17267    17.37383
         3 2012  |   15.90485   1.402501    11.34   0.000     13.14975    18.65995
         3 2013  |   16.85847   1.450341    11.62   0.000      14.0094    19.70755
         3 2014  |   15.73952   1.214331    12.96   0.000     13.35407    18.12497
         3 2015  |   16.14387   1.250479    12.91   0.000     13.68741    18.60033
         4 2008  |   2.268681   1.516736     1.50   0.135    -.7108196    5.248181
         4 2009  |  -2.397942   .7878615    -3.04   0.002     -3.94563   -.8502538
         4 2011  |  -1.823452    .754182    -2.42   0.016    -3.304979   -.3419243
         4 2012  |  -2.625012   .7485481    -3.51   0.000    -4.095472   -1.154552
         4 2013  |   1.439252    .648609     2.22   0.027     .1651142    2.713391
         4 2014  |  -3.073183   .7016184    -4.38   0.000    -4.451454   -1.694912
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.911696   1.706466    -1.71   0.089    -6.263905    .4405132
         2009 1  |   2.849278   1.705075     1.67   0.095    -.5002004    6.198756
         2009 2  |          0  (omitted)
         2011 1  |  -1.422952   1.112172    -1.28   0.201     -3.60772    .7618165
         2011 2  |          0  (omitted)
         2012 1  |     .25212   1.510749     0.17   0.868     -2.71562     3.21986
         2012 2  |          0  (omitted)
         2013 1  |   1.522076   1.141766     1.33   0.183    -.7208273    3.764979
         2013 2  |          0  (omitted)
         2014 1  |   1.238327   1.173735     1.06   0.292    -1.067378    3.544032
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0042052    .003174     1.32   0.186    -.0020299    .0104402
     CL_zonedate |  -.0145274   .0118375    -1.23   0.220    -.0377812    .0087263
        gw_depth |   .0356737    .032145     1.11   0.268    -.0274724    .0988199
           _cons |   10.97161   4.016596     2.73   0.007     3.081343    18.86188
-----------------+----------------------------------------------------------------
         sigma_u |  23.441018
         sigma_e |  17.515381
             rho |   .6417151   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est6 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"

added macro:
           e(controls) : "Y"

. esttab using "Tables\Parcel_Extract_DinD_robust_balanced_$outputdate.tex", label replac
> e ///
>         se star(* .10 ** .05 *** .01) ///
>         addnote(Table reports results from diff-in-diff regression. Standard errors are
>  clustered at the parcel level. Chloride measures groundwater salinity.  Time FE are qu
> arter-year interactions.) ///
>         keep(_cons treatment) ///
>         scalars("wellFE Parcel FE" "timeFE Quarter-Year FE" "controls County-Year FE") 
> ///
>         cells(b(star fmt(2)) se(par fmt(2)))
(output written to Tables\Parcel_Extract_DinD_robust_balanced_20231129.tex)

. eststo clear

. 
. log close
      name:  <unnamed>
       log:  D:\Ellen\Dropbox\Pajaro_AgInnovation\Submission\JAERE\Replication_Code\Log\D
> inD_quarterly_log.log
  log type:  text
 closed on:  29 Nov 2023, 16:56:15
-----------------------------------------------------------------------------------------
